package fundamentals;

public class NullStringLengthCall {

	public static void main(String[] args) {
		System.out.println("args.length=" + args.length);
		for (int i = 0; i < args.length; i++) {
			System.out.println("args[" + i + "]=" + args[i]);
		}
		
		String[] clone = args.clone();
		System.out.println("clone.length=" + clone.length);
		for (int i = 0; i < clone.length; i++) {
			System.out.println("clone[" + i + "]=" + clone[i]);
			clone[i] = String.valueOf(i);
		}
		
		System.out.println("args.length=" + args.length);
		for (int i = 0; i < args.length; i++) {
			System.out.println("args[" + i + "]=" + args[i]);
		}
		
		System.out.println("clone.length=" + clone.length);
		for (int i = 0; i < clone.length; i++) {
			System.out.println("clone[" + i + "]=" + clone[i]);
		}
		
		System.out.println(args + "!=" + clone);
		
//		String a = null;
//		if (a.length() > 0) {
//			System.out.println("YES");
//		}
//		else {
//			System.out.println("NO");
//		}
	}
	
//	    public void test() {
//	        boolean x = true;
//	        Object o = null;
//
//	        for (;;) {
//	            if (x) 
//	            	o = new Object();
////	            else 
////	            	o = new Object();
//	            
//	            o.toString(); // warning here
//
//	            o = null;
//	        }
//	    }
	 
	
}
